package com.easywork.mystery.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.easywork.mystery.entity.MsgInfo;
import com.easywork.mystery.repository.MsgInfoRepository;

@Transactional
@Service
public class MsgInfoService {
	@Autowired
	private MsgInfoRepository msginfoRepository;

	public MsgInfoRepository getMsgInfoRepository() {
		return msginfoRepository;
	}

	// --根据id查看该条数据
	public MsgInfo findById(Long id) {
		return msginfoRepository.findOne(id);
	}

	// --根据id删除该条数据
	public void delById(Long id) {
		msginfoRepository.delete(id);
	}
}